import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '所属部门',
    align:"center",
    dataIndex: 'sysOrgCode'
   },
   {
    title: '分类',
    align:"center",
    dataIndex: 'dvCategory'
   },
   {
    title: '代码',
    align:"center",
    dataIndex: 'dvCode'
   },
   {
    title: '名称',
    align:"center",
    dataIndex: 'dvName'
   },
   {
    title: '描述',
    align:"center",
    dataIndex: 'dvDescription'
   },
   {
    title: '链接参数',
    align:"center",
    dataIndex: 'dvParam'
   },
   {
    title: '链接路径',
    align:"center",
    dataIndex: 'dvUrl'
   },
   {
    title: '类型',
    align:"center",
    dataIndex: 'dvType'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
 {
    label: '所属部门',
    field: 'sysOrgCode',
    component: 'Input'
  },
 {
    label: '分类',
    field: 'dvCategory',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '所属部门',
    field: 'sysOrgCode',
    component: 'Input',
  },
  {
    label: '分类',
    field: 'dvCategory',
    component: 'Input',
  },
  {
    label: '代码',
    field: 'dvCode',
    component: 'Input',
  },
  {
    label: '名称',
    field: 'dvName',
    component: 'Input',
  },
  {
    label: '描述',
    field: 'dvDescription',
    component: 'Input',
  },
  {
    label: '链接参数',
    field: 'dvParam',
    component: 'Input',
  },
  {
    label: '链接路径',
    field: 'dvUrl',
    component: 'Input',
  },
  {
    label: '类型',
    field: 'dvType',
    component: 'Input',
  },
];
//子表表格配置
export const sysDataVisualUserColumns: JVxeColumn[] = [
    {
      title: '所属部门',
       key: 'sysOrgCode',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
    {
      title: 'DVID',
       key: 'dvid',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
    {
      title: '用户',
       key: 'userid',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
  ]
export const sysDataVisualRoleColumns: JVxeColumn[] = [
    {
      title: '所属部门',
       key: 'sysOrgCode',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
    {
      title: 'DVID',
       key: 'dvid',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
    {
      title: '角色ID',
       key: 'roleid',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue: '',
    },
  ]
